<?php include "../public/header.php";?>
<?php include "../public/header_show.php";?>
<body id="xiangqingPage">
<div id="xiangqingBox">
    <div class="page-title">
        <div class="page-title-con">
            <span class="pageshowtitle">详情</span>
            <div class="page-title-opt-list">
                <?php include "../public_flow/flow_show_optbut.php";?>
                <button class="layui-btn layui-btn-sm btn-light marginr5 opt">
                    操作<i class="layui-icon layui-icon-down layui-font-12"></i>
                </button>
                <span id="page-close" class="page-close" onclick="layer_close()">×</span>
            </div>
        </div>
    </div>
    <div class="main-container">

        <div><?php include "../public_flow/flow_show_info.php";?></div>

        <div class="table-box tablenes">
            <div class="title"><span>基本信息</span><span onclick="go_to_engin_xiang()" class="colorlan" style="float: right;margin-right: 12px">查看工程概况</span></div>
            <table class="layui-table">
                <tbody>
                <tr><td class="tt">工程名称</td><td id="enginname" class="tv colorlan"></td><td class="tt">工程编号</td><td id="engin_number" class="tv"></td></tr>
                <tr><td class="tt">业务归属</td><td id="engin_gui_unit_name" class="tv"></td><td class="tt">工程管理文件汇编</td><td id="engin_neiname" class="tv colorlan"></td></tr>
                <tr><td class="tt">工程负责人</td><td id="engin_gofuer" class="tv"></td><td class="tt">负责人联系电话</td><td id="engin_gofutel" class="tv"></td></tr>
                <tr><td class="tt">中标价(元)</td><td id="engin_winfee" class="tv"></td><td class="tt">合同结算价(元)</td><td id="engin_shijiefee" class="tv"></td></tr>
                </tbody>
            </table>
        </div>

        <div class="table-box tablenes">
            <div class="title">购买方信息</div>
            <table class="layui-table">
                <tbody>
                <tr><td class="tt">发包方(购买方)单位名称</td><td id="shouer" class="tv"></td><td class="tt">纳税人识别号</td><td id="ratenum" class="tv"></td></tr>
                <tr><td class="tt">开户行</td><td id="bankname" class="tv"></td><td class="tt">账号</td><td id="banknum" class="tv"></td></tr>
                <tr><td class="tt">地址</td><td id="unitaddr" class="tv"></td><td class="tt">电话</td><td id="phone" class="tv"></td></tr>
                </tbody>
            </table>
        </div>


        <div class="table-box tablenes">
            <div class="title">涉税信息</div>
            <table class="layui-table">
                <tbody>
                <tr><td class="tt">本次开具跨区域涉税金额(元)</td><td id="money" class="tv"></td><td class="tt">本次开具跨区域涉税日期</td><td id="kaidt" class="tv"></td></tr>
                <tr><td class="tt">上期累计开具跨区域涉税金额(元)</td><td id="qianfee" class="tv"></td><td class="tt">截止本次累计开具跨区域涉税金额(元)</td><td id="quanfee" class="tv"></td></tr>
                <tr><td class="tt">备注</td><td class="tv" id="explain" colspan="3"></td></tr>
                </tbody>
            </table>
        </div>


        <div><?php include "../public/upinfo_show.php";?></div>

        <div><?php include "../public_flow/flow_show_flowrelas.php";?></div>
        <div><?php include '../public_flow/flow_show_shenlog.php'?></div>
        <div><?php include '../public_flow/flow_show_talk.php'?></div>
        <div><?php include '../public/opt_browse.php'?></div>
    </div>
</div>
<script>
    var param_id = getQueryVariable('id') || 0;
    var pub_enginid;
    layui.use(['form', 'layer', "laytp",'element','dropdown','laypage','table','soulTable'], function() {
        var laypage = layui.laypage, table = layui.table, dropdown = layui.dropdown, form = layui.form, soulTable = layui.soulTable,element = layui.element;

        facade.ajax({url: ask_engin_kua_show, data:{id: param_id}}).done(function(res){
            if (res.code === 2000) {
                var data = res.data.data;
                var engininfo = res.data.engininfo;

                if(engininfo){
                    pub_enginid = engininfo.id
                    $("#enginname").text(engininfo.name).click(function () {
                        openPage('../engin/show.php?id='+engininfo.id);
                    });

                    $('#engin_number').text(engininfo.number);
                    $('#engin_gui_unit_name').text(engininfo.gui_unit_name);
                    $('#engin_gofuer').text(engininfo.gofuer);
                    $('#engin_gofutel').text(engininfo.gofutel);
                    if(engininfo.neiinfo){
                        $("#engin_neiname").text(engininfo.neiinfo.name).click(function () {
                            openPage('../contract_nei/show.php?id='+engininfo.neiinfo.id);
                        });
                    }
                    $('#engin_winfee').text(parseFormatNum(engininfo.winfee));
                    $('#engin_shijiefee').text(parseFormatNum(engininfo.shijiefee));
                }




                $("#shouer").text(data.shouer);
                $("#ratenum").text(data.ratenum);
                $("#kaidt").text(data.kaidt);
                $("#bankname").text(data.bankname);
                $("#banknum").text(data.banknum);
                $("#unitaddr").text(data.unitaddr);
                $("#phone").text(data.phone);
                $("#money").text(parseFormatNum(data.money));
                $("#qianfee").text(parseFormatNum(data.qianfee));
                $("#quanfee").text(parseFormatNum(data.quanfee));
                $("#explain").text(data.explain);


                public_flow_show_display(res.data.billinfo);
                public_upload_show_file('upload_files', res.data.files);
                render_from();
            }
        });

        public_get_readsandlog('engin_kua', param_id);
    });


    function go_to_engin_xiang(){
        if(pub_enginid){
            openPage('../engin/xiang.php?id='+pub_enginid);

        }else{
            facade.error("暂无工程信息");return false;
        }
    }
</script>
</body>
</html>




